package org.handover.repository;

import org.handover.domain.UserInformation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public interface UserInformationRepository extends JpaRepository<UserInformation, Long>{

    Boolean existsByIdCard(String idCard);
    Boolean existsByIdNotAndIdCard(Long id, String idCard);

    Boolean existsByJobNumber(Integer jobNumber);
    Boolean existsByIdNotAndJobNumber(Long id, Integer jobNumber);

    Boolean existsByMorningDate(Date morningDate);
    Boolean existsByIdNotAndMorningDate(Long id, Date morningDate);
}
